package cn.tedu.springmvc.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/blogs")
public class BlogController {

    @RequestMapping("/add-new.do")
    public String addNew(String title) {
        title.length();
        return "BlogController.addNew -> " + title;
    }

    @RequestMapping("/delete.do")
    public String delete(String id) {
        Long idNumber = Long.valueOf(id);
        return "BlogController.delete, id -> " + idNumber;
    }

}
